package com.dg11185.nearshop.net.weixin;

import org.json.JSONObject;

import com.dg11185.libs.ormlite.field.DatabaseField;
import com.dg11185.libs.ormlite.table.DatabaseTable;
import com.dg11185.nearshop.db.entity.DbConstant;
/**
 * 
 * @author：Daibo    
 * @time：2014-9-3 下午4:26:51
 */
@DatabaseTable(tableName = DbConstant.TABLOID)
public class Tabloid {

    @DatabaseField(generatedId = true)
    public int id;

    @DatabaseField
    public String remark = "";   //标记消息的事件

    @DatabaseField(width = 20)
    public String createTime = "";

    @DatabaseField(width = 20)
    public String title = "";

    @DatabaseField(width = 50)
    public String description = "";

    @DatabaseField
    public String picUrl = "";  //消息图片地址

    @DatabaseField
    public String webUrl = ""; //webview跳转地址
    
    @DatabaseField
    public boolean isReaded = false; //消息状态，判断消息是否已经被用户读取
    
    public Tabloid(){
        
    }
    
    public void parseEntity(JSONObject object){
        remark = object.optString("remark");
        createTime = object.optString("create_time");
        title = object.optString("title");
        description = object.optString("description");
        picUrl = object.optString("picurl");
        webUrl = object.optString("jump_url");
    }
    
}
